<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <title>缺货机台看板</title>
    <!--<link rel="stylesheet" href="../../Home/reset.css">-->
    <!--<link rel="stylesheet" href="../../Home/common.css">-->
    <link rel="stylesheet" href="../../library/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="lackAisle.css">
    <script src="../../library/jquery/jquery-1.11.3.js"></script>
    <script src="../../library/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<!--主页面-->
<div data-role="page" id="pageone" style="font-size:.12rem;">
    <div data-role="header" data-theme="a" data-position="fixed" class="header">
        <a href="../manageBoard/" target="_self" class="ui-btn ui-btn-b ui-icon-carat-l ui-btn-icon-notext" data-transition="slide" data-direction="reverse"><</a>
        <h2 style="font-size: 16px;">缺货机台看板</h2>
        <!--<a href="#pagetwo" target="_self" class="ui-btn ui-btn-b ui-icon-bars ui-btn-icon-notext" data-transition="slide" data-direction="reverse" style="padding-right: 14px;">条件筛选</a>-->
    </div>
    <div data-role="main" id="wrap" class="ui-content">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" id="myTab">
        <thead>
        <tr>
            <th>编号</th>
            <th>机台名称</th>
            <th>货道数</th>
            <th>缺货道数</th>
            </tr>
        </thead>
        <tbody align="center">
        </tbody>
        </table>
    </div>
</div>
<!--条件筛选页面-->
<script src="../../library/vue/vue.js"></script>
<script src="../../library/vue/vue-resource.js"></script>
<script >
    $(document).ready(function() {
        //获取浏览器地址中的参数
        var url = window.location.href;
        var text=window.localStorage.getItem("text");
        console.log(text);
        var modelsend=decodeURI(getParamer('modelSend'));
        modelsend.dillName=text;
        var model=jQuery.parseJSON(modelsend);
        model.dillName = text;
        console.log(model);
        var IP = 'https://up-bi.pec.com.cn';
        $.ajax({
            url: IP + '/data-center/recentBorad/getRecentBoardInfo?token=' + sessionStorage.getItem('userId'),
            type: "POST",
            data: {"paramData": JSON.stringify(model)},
            success: function (data) {
                console.log(data)
                var str='';
                for (var i=0;i<data.data.length;i++){
                    str+='<tr>' +
                        '<th>'+data.data[i].code+'</th>' +
                        '<th>'+data.data[i].vendor_name+'</th>' +
                        '<th>'+data.data[i].sum_oos+'</th>' +
                        '<th>'+data.data[i].count_oos+'</th>' +
                        '</tr>' +
                        '</thead>'
                }
                $("table>tbody").html(str)
            }
        })

    });
    //方法获取浏览器的url中的参数
    function getParamer(paramer){
        var url=window.location.href.split("?")[1];
        if(url.indexOf("&")>0){
            urlParamArry=url.split("&");
            for(var i=0; i<urlParamArry.length; i++){
                var paramerName=urlParamArry[i].split("=");
                if(paramer==paramerName[0]){
                    return paramerName[1];
                }
            }
        }else{
            var paramerValue=url.split("=")[1];
            return paramerValue;
        }
    }

</script>
</body>
</html>